<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>reg.html</title>
<!--	注册代码-->

<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<script type="text/javascript">
	function changeimg() {

		var btn = document.getElementById("btn");
		var img = document.getElementById("img");

		img.src = "/javaweb/identity?tm" + new Date().getTime();
	}

	//客户端验证
	function valid() {

		var user = document.getElementById("user");
		if (user.value.length == 0) {
			alert("用户名不能为空！");
			user.focus();
			return false;
		}
		if (user.value.length > 15) {
			alert("不能超过15个字符！");
			user.focus();
			return false;
		}
	}
</script>

<style type="text/css">
body {
	text-align: center;
	font-size: 12px;
}
ul
{
	width:500px;
}
ul li span {
	display: block;
	height: 30px;
	line-height: 30px;
	width: 180px;
	text-align: right;
	float:left;
}
ul li {
	list-style-type: none;
	clear: both;
}
</style>
</head>
<body>
	<span style="font-size:16px;font-weight:bold;">用户注册</span>
	<hr size="0" style="color:#3366FF;" noshade="noshade" />
	<div style="margin: 0 auto;/* border:1px solid red; */">
		<form action="/javaweb/reg" method="post">
			<ul>
				<li><span>用户名：</span> 
				<span><input type="text"
						name="username" id="user" onblur="valid()"> </span>
				</li>
				<li><span>邮箱：</span><span><input type="text" name="email" /></span></li>
				<li><span>密码： </span><span><input type="text" name="pwd" /></span></li>
				<li><span>确认密码: </span><span><input type="text" name="repwd" /></span></li>
				<li><span>姓名：</span> <span><input type="text" name="name" /></span></li>
				<li><span>年龄：</span> <span><input type="text" name="age" /></span></li>
				<li><span>请输入验证码： </span><span><input type="text" name="identity" /></span> <img
					alt="验证码" src="/javaweb/identity" id="img" /><a href="javascript:void(0)" onclick="changeimg()">看不清？</a> <input type="button"
					value="看不清？" onclick="changeimg()" id="btn" /></li>
				<li><input type="submit" value="注  册" /><input type="reset"
					value="重  置" /></li>
			</ul>
		</form>
	</div>
</body>
</html>
